import * as types from './mutation_types'
import request from '../../../util/axios'

// 获取档案门类
export const getCategoryAll = ({ commit }) => {
  return request({
    url: '/yuyi-category-boot/api/metadata/category/all'
  }).then((res) => {
    commit(types.TABLEHEAD_SET_CATEGORY, res.data.data)
    return res
  }).catch(e => {
    commit(types.TABLEHEAD_SET_CATEGORY, null)
    return e
  })
}
